Method and apparatus for line-specific decoding of VBI scan lines

ABSTRACT

Prior art methods of decoding a vertical blanking interval (VBI) scan line decoded each scan line within a given VBI using the same operational parameters, such as filter coefficients and run-in clock recovery parameters. The problem with these prior art methods is that each scan line was treated the same, even though certain scan lines within a given VBI typically exhibit different signal and content characteristics. The present invention provides for line-specific decoding of VBI scan lines. As such, each scan line within a given VBI is decoded using a set of operational parameters unique to that scan line number. These operational parameters are adjusted and maintained on a scan line by scan line basis.

This application is a continuation-in-part of copending U.S. applicationSer. No. 08/670,565, entitled METHOD AND APPARATUS FOR OPTIMIZINGSTARTING POINT FOR RUN-IN CLOCK RECOVERY, filed Jun. 26, 1996.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to the field of television signalprocessing. More specifically, the present invention relates toline-specific decoding of a vertical blanking interval (VBI) scan line.

2. Background Information

Television transmission signals typically include a vertical blankinginterval (VBI). The VBI refers to the time required by the electron gunin a conventional television set (or similar visual display) to resetitself to the top of the television screen from the bottom of thescreen. Conventional television sets and many other visual displaysgenerate their display by using an electron gun(s) to illuminate eachline on the television screen. For instance, the National TelevisionSystem Committee (NTSC) standard currently used in the United Statesilluminates every other scan line starting at the top of the screen,then resets itself to the top of the screen once it reaches the bottom.During this reset from the bottom of the screen to the top of thescreen, no lines of the screen are being illuminated. This period ofreset is referred to as the VBI.

Typically, a portion of the VBI is used by television broadcasters forcontrol information necessary for displaying audio and videoinformation. This control information includes, for example, verticaland horizontal synchronization signals. In addition, a portion of theVBI is typically reserved for broadcasting the text for closedcaptioning for the hearing impaired. However, unused time remains in theVBI which can be used by a broadcaster to broadcast any of a widevariety of data, typically referred to as teletext data, of thebroadcaster's choosing.

A plurality of scan lines occur during the VBI. VBI scan lines aretypically broadcast in accordance with one of a number of industrystandard formats. For example, teletext scan lines are often broadcastin accordance with the North American Basic Teletext Specification(NABTS)¹. Since hardware systems processing VBI scan lines typicallyoperate with their own internal system clocks, virtually all industrystandard formats call for the inclusion of a leading run-in clock at thebeginning of a VBI scan line, to facilitate synchronization and decodingof the VBI scan line. For example, NABTS calls for a modulated data bitrate of 5.7272 MHz, and the inclusion of 8 run-in clock cycles at thebeginning of a teletext scan line, followed by phase-aligned modulateddata bits to be decoded.

¹See Joint EIA/CVCC Recommended Practice for Teletext North AmericanBasic Teletext Specification (NABTS), EIA-516, May 1988.

As such, a VBI decoder typically includes functions for recovering thestarting point of the run-in clock. The VBI decoder adjusts the averagestarting point with the actual starting point of each run-in clock thatis encountered. The decoder maintains the average starting point suchthat it can be used with each scan line. The run-in clock averagestarting point is one of many “operational parameters” that areutilized, adjusted, and maintained by the decoder in decoding a scanline. A typical prior art VBI decoder uses the same average startingpoint parameter for each scan line within the VBI. While the averagestarting point parameter may be adjusted after a predetermined period oftime, only a single starting point parameter is used for each scan line.

A second operational parameter used in decoding the scan line is theaverage voltage level of the run-in clock. The run-in clock recoveryportion of the VBI decoder may include a function for computing theaverage voltage level of the run-in clock. This average voltage level isthen used as a threshold voltage during the decoding of the scan linedata. For instance, if a voltage greater than the average voltage levelis detected, it is considered a logical one. If a detected voltage isless than the average voltage level, it is considered a logical zero.

The average voltage level parameter may also be used in detecting thestarting edge of the run-in clock for the following scan line. A typicalprior art decoder uses the same average voltage level parameter from afirst scan line for detecting the leading edge of the following scanline received. Although the average voltage level parameter may beadjusted with each scan line decoded, only a single average voltagelevel parameter is maintained.

Another set of operational parameters maintained by the scan linedecoder are anti-ghosting filter parameters. Ghosting results from anecho(es) of the transmitted signal. Ghosting occurs when there is areflection of a television signal or similar “bouncing” of the signaloff of a particular object in or near the signal's path. Ghostingpresents a problem when transferring data over the VBI because thereflected or echoed signal(s) interferes with the data beingtransmitted.

Several anti-ghosting mechanisms have been developed to reduce theeffects of ghosting in a television transmission signal. Two suchmechanisms are referred to as Adaptive Baseband Equalization (ABBE)filtering and Lookup Table (LUT) filtering. Both of these anti-ghostingfiltering mechanisms look at one or more surrounding samples for aparticular sample of data and perform various filtering processes usingthese bits to reduce the ghosting effects on the signal beingtransferred. Each of these filtering methods includes the step ofapplying one or more filter parameters to the scan line. The filterparameters are adjusted over time to ensure that the filtering methodsremain effective.

Similar to the run-in clock characteristics, the same adjusted filterparameters are applied to each scan line received within a single VBI.Thus, a prior art decoder treats every scan line received as if it hassimilar signal characteristics, thus utilizing the same operationalparameters.

However, with VBI transmissions, each scan line may have differentcharacteristics based upon its content, source and transmission. Forinstance, the NABTS defines 21 scan lines that are available within agiven VBI. Certain scan lines, or groups of scan lines, may be dedicatedto a particular broadcaster. For instance, scan lines 10-13 may bededicated to a first broadcaster, and scan lines 14-15 may be dedicatedto a second broadcaster. Because the first and second broadcasters mayhave different encoding methods, scan lines 10-13 may have differentcharacteristics than scan lines 14-15. Moreover, scan lines 10-13 may betransmitted over different transmission channels than lines 14-15,creating different signal characteristics. For example, a localbroadcaster may insert teletext data on lines 10-13, while passingteletext data sourced from a nationwide network on lines 14-15.

As such, it is desirable to provide for line-specific decoding of scanlines broadcast within a VBI. It is further desirable to provide for adecoder that adjusts and maintains a separate set of operationalparameters for each scan line received within a given VBI.

SUMMARY OF THE INVENTION

A system is programmed with a line-specific VBI scan line decoder. Thedecoder receives a scan line from a capture driver, the scan line havingassociated with it a scan line number. Using this scan line number as anindex, the decoder retrieves a set of operational parameters from astorage medium. These operational parameters correspond only to the scanline number of the scan line received from the capture driver. Theline-specific decoder then decodes the scan line using the operationalparameters. For one embodiment, the decoding step also includes run-inclock recovery and anti-ghosting filtering. Once the scan line has beendecoded, the operational parameters are adjusted based upon the resultsof the scan-line decoding.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 is a block diagram illustrating an overview of a method ofoptimizing the starting point for run-in clock recovery;

FIG. 2a is a flow diagram illustrating one embodiment of the operationalsteps of a noise tolerant run-in clock recovery function.

FIG. 2b is a flow diagram illustrating additional operational steps ofthe noise tolerant run-in clock recovery function of FIG. 2.

FIG. 3 is a flow diagrams illustrating one embodiment of the operationalsteps of a noise tolerant run-in clock recovery function;

FIG. 4 is a block diagram illustrating one embodiment of a softwareenvironment suitable for practicing the present invention;

FIG. 5 is a block diagram illustrating one embodiment of a hardwaresystem suitable for programming with the software environment of FIG. 4;

FIG. 6 is a block diagram illustrating an overview of an anti-ghostingfiltering process of a scan line decoder; and

FIG. 7 is a flow diagram illustrating one embodiment of the operationalsteps of the line-specific decoder of the present invention.

DETAILED DESCRIPTION OF THE INVENTION

In the following description, various aspects of the present inventionwill be described in detail. For purposes of explanation, specificnumbers, materials and configurations are set forth in order to providea thorough understanding of the present invention. However, it will alsobe apparent to one skilled in the art that the present invention may bepracticed without these specific details. In other instances, well knownfeatures are not set forth in detail in order not to obscure the presentinvention.

Various operations will be described as multiple discrete steps in turnin a manner that is most helpful in understanding the present invention,however, the order of description should not be construed as to implythat these operations are necessarily order dependent, in particular,the order of presentation.

The present invention includes a scan line decoder that decodes eachscan line using line-specific operational parameters. Depending on thefunctionality of the decoder, the operational parameters may includeanti-ghosting parameters, run-in clock recovery parameters, filter modeparameters, and diagnostic parameters. These various types ofoperational parameters will be discussed in more detail herein below.

FIG. 4 illustrates a block diagram of a software environment suitablefor implementing the present invention. As shown, software embodiment100 includes common VBI scan line decoder 10 (hereinafter simply commondecoder), and capture driver 112, cooperating with each other togenerate image scan lines 18, and VBI scan lines 14. VBI scan lines 14are decoded by decoder 10 into VBI stack 16. The functionality of thesoftware environment 100 will be further described herein below withreference to FIG. 4.

Referring now to FIG. 1, a block diagram illustrating an overview of arun-in clock recovery function is shown. For one embodiment, the clockrecovery function 110 is implemented within decoder 10 of FIG. 4. Asshown, in accordance with a first aspect of the present invention, VBIscan line run-in clock recovery function 110 (hereinafter simplyrecovery function) recovers a leading run-in clock included at thebeginning of a VBI scan line in a more accurate manner, tolerating thepresence of noise in one or more of the clock cycles of the leadingrun-in clock. More specifically, for the illustrated embodiment,recovery function 110 determines the phase adjustment for readingsampling data, using only phase error observations that fall within aheavily populated phase error super-subrange, and excluding theremaining phase error observations from the determination, to bedescribed more fully below. As will be appreciated by those skilled inthe art, from the description to follow, recovery function 110 providesa more accurate approach to recovery of the leading run-in clock, andreduces unnecessary rejections of VBI scan lines. In recovering therun-in clock, the recovery function 110 utilizes one or more scanline-specific operational parameters. As described below, one suchoperational parameter is the average starting point of the run-in clock.Another operational parameter is the average voltage level of the run-inclock.

For one embodiment, recovery function 110 includes an optimizationtechnique for optimizing the starting point for analyzing the run-inclock, thereby reducing CPU cycle consumption on unproductive analysis,as well as reducing susceptibility to noise before the start of therun-in clock.

Refer now to FIGS. 2a, 2 b and 3, wherein one embodiment of theoperational flow of recovery function 110 is illustrated. As shown inFIG. 2a, for the illustrated embodiment, upon invocation, recoveryfunction 110 sets the starting point for analyzing the run-in clock toan average starting position maintained by recovery function 110, step12. For the illustrated embodiment, the average starting point is set tothe beginning of captured data for a scan line at initialization orreset.

In one embodiment, recovery function 110 further applies a safetythreshold to the starting position to account for timing jitter fromscan line to scan line or field to field, e.g. by subtracting apredetermined period from the current average starting position of therun-in clock.

Continuing to refer to FIG. 2a, having established the starting point,recovery function 110 looks for the first rising edge, step 14. For oneembodiment, the first rising edge is detected by finding a voltage levelthat is higher than an average voltage level parameter, described inmore detail below. If the first rising edge is found within a firstsampling limit (window), recovery function 110 continues with step 16,otherwise, recovery function 110 rejects the scan line. At step 16,recovery function 110 notes the time position where the first risingedge was detected for the current scan line. In one embodiment, designedto support NABTS compliant teletext scan lines at an oversampling ratioof 5 to 1, the first sampling limit equals 128 samples.

Having located the first rising edge, recovery function 110 looks forthe first maximum voltage, or “peak,” step 18. Similarly, if the firstpeak is found within a second sample limit, recovery function 110continues with step 20, otherwise, recovery function 110 rejects thescan line. In the above described NABTS supporting embodiment, thesecond sampling limit equals 7 samples.

Once the first peak is located, recovery function 110 looks for thepeaks and minimum voltages (“valleys”) for all successive clock cycles,steps 20-28. Similarly, for each peak/valley search, step 20 or 24, ifthe peak/valley is found within the second sample limit, recoveryfunction 110 continues, otherwise, recovery function 110 rejects thescan line. Starting with the first valley, each time a valley is found,recovery function determines the phase error, step 22. Likewise,starting with the second peak, each time a peak is found, recoveryfunction determines the phase error, step 26. Recovery function 110continues this process, until the last clock cycle has been located,step 28. In the above described NABTS supporting embodiment, the lastclock cycle is the 8th clock cycle.

The phase error computations of steps 22 and 26 may be performedaccording to any one of a number of known techniques. For example, phaseerror may be computed in accordance with the sample position and anestimated arctangent value (phase error=phase error+sampleposition+estimated arctangent value). The estimated arctangent valuerepresents the amount of “tilting” of a line connecting the pre-max/minvalue and the post-max/min value. The estimated arctangent value iscomputed from a fraction formed by the difference between a post-max/minvalue and a pre-max/min value, and the sum of the differences betweenthe max/min value and the pre-max/min value, and the max/min value andthe post-max/min value (fraction=(post max/min value−pre-max/minvalue)/((max/min value−pre-max/min value)+(max/min value−post max/minvalue))).

Having computed the phase errors from all peaks and valleys found,recovery function 110 determines the maximum and minimum phase errors,step 30. As shown in FIG. 2b, based on the maximum and minimum phaseerrors, recovery function 110 computes a phase error range, step 32.Then, recovery function 110 divides the phase error range intosubranges, step 34, determines the number of phase errors in eachsubrange, step 36. For the illustrated embodiment, recovery function 110divides the phase error range into 8 subranges.

Having found the population in each subrange, recovery function 110selects N or less contiguous subranges to form an eligible phase errorsuper-subrange, step 38. For the above described NABTS supportingembodiment, N equals 3 subranges. Having constructed the eligible phaseerror super-subrange, recovery function 110 sets the lower and upperphase error limits of the super-subrange to the lower limit of thelowest contiguous subrange and the upper limit of the contiguoussubrange respectively, step 40.

Next, recovery function 110 calculates the average phase error, usingonly phase errors that fall within the eligible phase errorsuper-subrange, and excluding all other phase errors, step 42, therebyexcluding distortions in a few clock cycles due to the presence ofnoise, improving accuracy, and avoiding unnecessary rejections of scanlines. Recovery function 110 then sets phase adjustment to thecalculated average phase error, step 44.

Finally, recovery function 110 updates the average starting point foranalyzing the run-in clock, including the most recent position where thefirst rising edge of the run-in clock is found, step 46. In oneembodiment, recovery function 110 further applies another safetythreshold to the updated average starting point to prevent the averagestarting position to drift too far into the run-in clock, e.g. bylimiting the start position to be no greater than a predetermined numberof samples from the beginning of the captured scan line.

In one embodiment, recovery function 110 further periodically scans thepedestal data between the beginning of the captured scan line and thecurrent average start position. If a rising edge is found in thisregion, the current average start position is set back to the positionof that rising edge. A typical period for performing such scanning is 15to 60 scan lines.

FIG. 3 illustrates one embodiment of step 38 in further detail. Asshown, for the illustrated embodiment, recovery function 110 firstperforms a one direction scan for 3 most populated subranges, step 48.Then, recovery function 110 determines if the subranges adjacent to themost populated subrange can be substituted as the second and/or thirdmost populated subranges, steps 50-52. The reason this “swapping” may benecessary is because subranges adjacent to the most populated subrangemay not have been considered as the second or third most populatedsubrange, because their population was merely equal but not greater thana subrange earlier considered to be the second or third subrange. Forexample, if the one direction scan was from subrange 0 to subrange 7,subrange 1 has three phase error observations falling within itssubrange, and subrange 5 is considered to be the most populated subrangeby virtue of having four phase error observations falling within itssubrange, subrange 6 would not be considered as the second mostpopulated subrange during the one direction scan, even if it also hasthree phase error observations falling within its subrange, because thepopulation count merely equals but not greater than the population countof subrange 1. In other words, in steps 50-52, if i is the subrangeindex of the most populated subrange, recovery function 110 examines if{i−1, i+1}, {i+1, i+2} and {i−1, i−2} can be considered as second andthird or third and second most populated subranges (for all validindices²).

²For i=0, i−1 and i−2 are invalid; likewise for i=7, i+1 and i+2 areinvalid.

Having determined the three most populated subranges, recovery function110 determines their order, i.e. first, second, and third, or, first,third and second, and so forth, most populated, step 54. Then, recoveryfunction 110 determines if the three subranges are contiguous, step 56.If they are already contiguous, recovery function 110 selects all threesubranges to form the eligible super-subrange, step 58. On the otherhand, if the three subranges are not contiguous, recovery function 110determines if at least two of the subranges are contiguous, i.e. low andmid subranges or mid and high subranges, step 60. If at least two of thesubranges are contiguous, recovery function 110 further determines ifthe sum of the populations of the two contiguous subranges is greaterthan the single non-contiguous subrange, step 62. If the sum is greater,recovery function 110 selects the two contiguous subranges to form theeligible super-subrange, step 64. Otherwise, recovery function 110selects the most populated subrange as the eligible super subrange, step66.

In one embodiment, the above described recovery function 110 is invokedto recover the run-in clock, after a VBI scan line has been rejectedusing a conventional clock recovery approach. As will be appreciated bythose skilled in the art, the recovery function 110 while more accuratewill require more processing cycles, thus a hybrid approach may providethe desired improvement in accuracy without incurring significantincrease to processing cycle requirement, particularly when noise occursonly intermittently.

The noise tolerant run-in clock recovery function is further describedin copending U.S. patent application Ser. No. 08/670,564, entitled“Noise Tolerant Run-In Clock Recovery Method and Apparatus,” filed onJun. 26, 1996.

As was mentioned previously, a prior art VBI decoder included a recoveryfunction 110 that used the same operational parameters for each scanline within a VBI. Once the recovery function 110 determined the averagestarting position parameter of a first VBI scan line, that parameter wasutilized by the recovery function 110 for detecting the run-in clock ofthe following VBI scan line. Recall that because different scan lineswithin a given VBI may have different signal characteristics, differentscan lines may have different average starting positions.

To provide for more accurate run-in clock detection and recovery, thepresent invention provides for a recovery function 110 that utilizes ascan line-specific average starting position parameter. For instance,the first scan line of each VBI has a particular average startingposition parameter associated with it. The average starting positionparameter is used to detect the starting position of the run-in clock,and then adjusted appropriately according to the method described above.The second, third, fourth, etc., scan lines of each VBI have their ownunique average starting position parameters that are used by the clockrecovery function 110. The present invention therefore takes intoconsideration the differences in signal characteristics, and thusstarting positions, from one scan line to the next.

In addition to the starting position and phase error calculationsdescribed above, the recovery function 110 performs an average voltagelevel calculation of the run-in clock. The recovery function 110 keeps arunning average of the voltage level of each cycle of the run-in clock.This running average is referred to as the average voltage levelparameter. One prior art decoder includes a recovery function 110 thatuses the average voltage level of a first VBI scan line to detect therising clock edge of the first run-in clock for the following VBI scanline. However, because different scan lines within a given VBI may havedifferent signal characteristics, the different scan lines may havedifferent average voltage levels.

The present invention takes into consideration the different signalcharacteristics between the two VBI scan lines. The present inventionmaintains an average voltage level parameter unique to each scan linewithin a given VBI. As such, when the rising edge of the run-in clockfor the first scan line is being detected, the recovery function 110uses the average voltage level parameter associated with the first scanline. This average voltage level parameter is then adjusted according tothe running average of the run-in clock for the first scan line.Similarly, the recovery function 110 detects the run-in clock of thesecond, third, fourth, etc., scan lines using average voltage parametersunique to each of these scan lines. The unique average voltage levelparameters are adjusted and maintained on a scan line by scan linebasis.

The average voltage level parameter is also used for data slicing, aprocess performed in decoding VBI scan line data. During data slicing,each scan line data value sampled by the decoder is compared with theaverage voltage level parameter to determine whether the sampled valueis a logical one or logical zero. A decoder of the present inventionperforms data slicing using a unique average voltage level parameter foreach scan line within a given VBI.

One embodiment of the invention includes a data array for storing theline-specific operational parameters. Thus, when the first scan line ofeach VBI is being decoded, the decoder accesses this data array toretrieve the unique operational parameters for scan line number one.Once the operational parameters have been adjusted, they are once againstored in the data array for use in decoding scan line number one of thenext VBI.

In addition to the clock recovery and data-slicing functions describedabove, recall that the VBI scan line decoder 10 of FIG. 4 also performsanti-ghosting filtering. This anti-ghosting filtering process 705 isillustrated in FIG. 6.

Data is received during the vertical blanking interval from an NABTSsignal. The data is filtered through the anti-ghosting filtering process705, which includes two types of anti-ghosting filters. For theembodiment illustrated in FIG. 6, the anti-ghosting filtering process705 includes both an Adaptive Baseband Equalization (ABBE) filter 707and a Lookup Table (LUT) filter 708.

The anti-ghosted data is input to the error detection logic 710, whichdetects errors in the anti-ghosted data, and reports these errors to theanti-ghosting monitor 715. For one embodiment, the error reportsgenerated by the error detection logic 710 are operational parameters,that are adjusted and maintained by the decoder on a scan line by scanline basis.

The anti-ghosting monitor 715 retrieves operational parameters foranti-ghosting filtering, called filtering parameters, used by the ABBEfilter 707 and the LUT filter 708. The anti-ghosting monitor 715 updatesthe filtering process 705 based upon these filtering parameters as wellas errors reported by the error detection logic 710. For the ABBE filter707, the filtering parameters comprise one or more ABBE coefficientsthat are multiplied by a scan-line value currently being sampled tocreate an ABBE-filtered value. For the LUT filter 708, the filteringparameters comprise one or more LUT coefficients that are values storedwithin a lookup table. The LUT coefficients are added to the ABBEfiltered value, resulting in an anti-ghosted value.

The ABBE and LUT filtering parameters are slowly trained over time. Thefilter parameters are adjusted based upon comparison of the filteredvalue with a predetermined value. For the present embodiment of theinvention, a unique set of filtering parameters are adjusted andmaintained for each specific scan line that is decoded. Thus, the firstscan line within a given VBI has a first set of filtering parametersassociated with it, as well as the second, third, fourth, etc., scanlines within a given VBI. The training of anti-ghosting filtering isdescribed in more detail in copending U.S. patent application Ser. No.08/670,563, entitled “A Self-Correcting Anti-Ghosting Process,” filedJun. 26, 1996.

As was mentioned previously, the error detection logic 710 isresponsible for detecting errors in the anti-ghosting filtering process705, and reporting these errors to the anti-ghosting monitor 715. Forone embodiment, the error detection logic 710 includes four types oferror checking: (1) frame code checking, (2) Hamming coding of certainbytes, (3) test patterns, and (4) forward error correction.

In response to the errors reported by the error detection logic 710, theanti-ghosting monitor 715 adjusts the level of filtering, or “filtermode,” provided by anti-ghosting filtering process 705. Each filter modeprovides a different level of anti-ghosting filtering, based upon need.For instance, the number of coefficients used by the ABBE filter 707 maybe increased if more errors are reported, or decreased if less errorsare reported. The LUT filter 708 may be turned on if more errors arereported, or disabled if less errors are reported. This adaptive filtermode process is described in more detail in copending U.S. applicationSer. No. 08/672,257, entitled “A Mechanism for Adaptive Selection ofAnti-Ghosting Filtering,” filed Jun. 26, 1996.

One or more operational parameters are used to indicate which filtermode the anti-ghosting filtering process 705 is in. For one embodiment,the filter mode is indicated by a scan line specific filter modeparameter that is used by the anti-ghosting filtering process 705 todetermine the level of filtering to apply to a certain scan line. Thisunique filter mode parameter is adjusted and maintained for each scanline. As such, the first scan line within a given VBI has a uniquefilter mode parameter associated with it, as well as the second, third,fourth, etc., scan lines within a given VBI.

FIG. 7 illustrates one embodiment of the operational steps of theline-specific decoder of the present invention. The line-specificdecoder starts its function at step 820, when receiving a scan line ofdata. As was mentioned previously, the VBI scan line is typicallycaptured by a capture driver and then input to the scan line decoder atstep 820. The capture of VBI scan lines is well-known in the prior artand therefore will not be discussed in detail herein.

The scan line decoder then retrieves the line-specific operationalparameters associated with the scan line being decoded at step 830. Forone embodiment, step 830 is accomplished by first determining a scanline number associated with the scan line. For one embodiment, thedecoder maintains a counter value that keeps track of each scan line ofdata received from the capture driver. The counter value is incrementedonce for each scan line received, and the counter value is reset at thebeginning of each VBI. Thus, the counter value indicates the scan linenumber corresponding to the scan line received. For one embodiment, thevertical blanking interval comprises 21 scan lines. The first scan linewould be designated as scan line number one, the second as scan linenumber two, etc. For another embodiment, VBI scan lines 1-9 are notused. Therefore, the line number corresponding to the first entry in thedata array of operational parameters starts with the tenth scan linereceived.

Once the scan line number is determined, the scan line number, or avalue derived from the scan line number, is used to index a data arrayof operational parameters stored in a storage medium. The appropriateline-specific operational parameters are retrieved from the data arrayand used in decoding the scan line at step 840. For one embodiment, thedata array is stored within system memory 214 of FIG. 5, which maycomprise, for instance, dynamic random access memory (DRAM).

As was mentioned herein above, the operational parameters may comprise anumber of various parameters used for filtering, clock recovery, filtermode, and diagnostics. For example, the following Tables 1-4 illustratevarious operational parameters maintained separately for each VBI scanline. The discussion following Tables 1-4 will refer to the “current VBIscan line;” meaning the particular scan line number currently beingdecoded.

Table 1-filter Parameters Filter Parameter Description ABBECoeffs One ormore ABBE filter coefficients LUTCoeffs One or more LUT filtercoefficients Table 2 - Clock Recovery Parameters Clock RecoveryParameter Description AvgStart Average run-in clock start time DCAVgAverage run-in clock DC Voltage level Table 3 - Filter Mode ParametersFilter Mode Parameter Description GhostMode Level of filtering to usefor VBI scan line FCErr Snapshot of last frame code error CorrHamFrrSnapshot of last Hamming code error UncHamErr Snapshot of lastuncorrectable Hamming code error FCCnt Ongoing updated frame code errorcount CorrHamCt Ongoing updated hamming code error count UncHamCtOngoing updated uncorrectable Hamming code error count

Diagnostic Parameter Description TotalPackAtt Total number of packetsscanned or attempted IndicPackCnt Packet count indicated as successfullydecoded NABTSPackCnt Number of NABTS packets received UnkPackCnt Totalnumber of unkown frame code packets AbortPackCnt Aborted Packet CountOver4HammErr Too many Hamming Errors NoFC No valid Frame code foundRejectNABTSFC NABTS Frame code rejected RejectAdd Packet AddressRejected DataDecErr Data Decode Error detected NoClkErr No clock foundduring clock recovery BadAmp Bad amplitude during clock recovery SoftErrUnexpected software error occurred during decode Minclk Minimum clocklevel found during clock recovery Maxclk Maximum clock level foundduring clock recovery Avgclk Average clock level found during clockrecovery AvgLevHist Histogram of average signal level detected

Table 1 illustrates two types of filter parameters that are used in theanti-ghosting filtering process (see, e.g., FIG. 6), which is invokedduring the decode step 840. The ABBE coefficients (ABBECoeffs) areemployed by the ABBE filter, and the LUT coefficients (LUTCoeffs) areemployed by the LUT filter. Recall that the number of ABBE filtercoefficients, and the type of filter used, will vary depending on thelevel of filtering selected for the VBI scan line. For instance, the LUTfilter may be completely disabled at times. The filter mode parameter(GhostMode, Table 3) is therefore used in conjunction with the filterparameters in performing anti-ghosting filtering on the current VBI scanline.

Recall that the LUT coefficients used by the LUT filter are typicallykept in a lookup table. Depending on the particular implementation ofthe LUT filter, the lookup table can be large, taking up a lot of spacein memory. Thus, for one embodiment of the invention, only the ABBEcoefficients, and not the LUT coefficients, are maintained on a scanline by scan line basis.

Table 2 illustrates the clock recovery parameters that are used by theclock recovery function (see, e.g., FIG. 1), which is invoked during thedecode step 840. The average start parameter (AvgStart) indicates theaverage starting position of the run-in clock for the current VBI scanline being decoded. The average voltage level parameter (DCAvg)indicates the average voltage level of the run-in clock for the currentVBI scan line being decoded. Recall that the average voltage level maybe used both in detecting the rising edge of the first run-in clock, andalso in data slicing during decoding of the current VBI scan line data.

Table 3 illustrates the filter mode parameters that are used by theanti-ghosting filtering process (see, e.g., FIG. 6), which is invokedduring the decode step 840. As was mentioned previously, the ghost modeparameter (GhostMode) indicates a level of anti-ghosting filtering to beapplied to the current VBI scan line being decoded. For instance, thenumber of filter coefficients used by the ABBE filter may vary.Additionally, the LUT filter may be enabled or disabled.

As was described herein above, error detection logic 710 of FIG. 6performs error checking on the current VBI scan line data. The resultsof the error checking, “error parameters,” are then used during thedecode step 840 to determine the level of filtering to be applied to theVBI scan line. Three error parameters in Table 3 provide an ongoingpicture of the error checking. The frame code error count (FCCnt), theHamming code error count (HamCt) and the uncorrectable Hamming codeerror count (UncHamCt) parameters indicate the ongoing values of thevarious types of error checking performed on the current VBI scan line.Three more error parameters in Table 3 are used to provide a periodicsnapshot picture of the error count occurring during decode. The framecode error (FCErr), the correctable Hamming code error (CorrHamErr) andthe uncorrectable Hamming code error (UncHamErr) parameters provide thesnapshot information.

As was described herein above, the error parameters partially determinethe level of filtering to be applied to the current VBI scan line. Theghost mode parameter also indicates the level of filtering to be appliedto the current VBI scan line.

For one embodiment of the invention, the error parameters are maintainedon a scan line by scan line basis in order to provide for diagnosticmonitoring. Diagnostic software routines can access the error parametersfor each individual scan line to determine whether a certain scan line(e.g., scan line number one) has a higher error count than other scanlines. Additionally, such diagnostic software routines can attempt tofind correlations between error parameters and signal characteristicsfor a given VBI scan line. The knowledge gained from these diagnosticparameters can be used to fine-tune the algorithm used in the decodingstep 840 for each scan line number within a given VBI. Additionally, auser can monitor the diagnostic parameters to determine which scan linesof the VBI contain usable information, to determine how the antennashould be tuned, etc.

Table 4 includes more diagnostic parameters for monitoring statisticsrelated to the decode step 840 performed on the current VBI scan line.

The diagnostic parameters also include statistics about the scan linedata that is decoded. For one embodiment “packet” refers to the datacontained within the current VBI scan line. Table 4 includes the totalnumber of data packets attempted to be decoded (TotalPackAtt), thepacket count indicated (IndicPackCnt), and number of NABTS packetsreceived (NABTSPackCnt), the number of unknown frame code packetsencountered (UnkPackCnt), and the total number of aborted packets(AbortPackCnt).

The diagnostic parameters of Table 4 include errors that occurred duringthe decode step 840. The Hamming error parameter (Over4HammErr)indicates that too many Hamming errors (e.g., over 4) were encounteredwhile decoding the current scan line number. Moreover, the frame codeerror (NoFC) indicates that no frame code was found for the current VBIscan line. The frame code reject (RejectNABTSFC) parameter indicatesthat the NABTS frame code was rejected during decode. The packet addressreject (RejectAdd) indicates that the packet address was rejected duringdecode. The data decode error (DataDecErr) parameter signals that anerror was incurred during the decoding of the packet during decode step840. When an unexpected software error occurs during decode step 840,this is indicated by the software error parameter (SoftErr).

For one embodiment, the diagnostic parameters also include clockrecovery errors such as the no clock (NoClkErr) parameter and the badamplitude (BadAmp) parameter. Moreover, the diagnostic parameters mayinclude clock recovery statistics such as minimum clock level (Minclk),maximum clock level (Maxclk), and average clock level (Avgclk). Anaverage signal level histogram (AvgLevHist) parameter is alsomaintained.

It should be appreciated that the diagnostic parameters of Table 4 aretypically used as debug and analysis tools for improving upon decodingof VBI scan lines. As such, certain ones of the diagnostic parameterswill prove to be more or less useful, depending on theimplementation-specific details of each VBI scan line decoder. It shouldtherefore be appreciated that the list of diagnostic parameters of Table4 may be increased or decreased, according to individual need, withoutdeparting from the scope of the present invention. For instance, one mayfind it useful to maintain a number of histograms for various signalparameters in order to fine-tune the line-specific decoding of thepresent invention.

The operational parameters discussed with reference to Tables 1-4 aboveare meant to be exemplary of the types of parameters that would beuseful to maintain on a scan line by scan line basis. It should beappreciated, however, that the number and type of operational parametersused in the scan line specific decoder of the present invention may varywithout departing from the scope of the invention. For instance, for oneembodiment, the operational parameters maintained on a scan line by scanline basis may include only the filter parameters, wherein the otherparameters are applied to each scan line within a given VBI, inaccordance with prior art decoding methods.

Once the scan line has been decoded according to scan line specificoperational parameters, the operational parameters are adjusted at step850 of FIG. 7. For example, the ABBE and LUT filter parameters of Table1 and the filter mode parameters of Table 3 are adjusted according tothe results of error detection logic 710 of FIG. 6. The clock recoveryparameters of Table 2 are adjusted based on the run-in clock of thecurrent VBI scan line. The diagnostic parameters of Table 4 are adjustedto reflect any new statistics or errors incurred during the decode step840.

For one embodiment of the invention, the one or more of the operationalparameters are not adjusted each time a scan line is decoded. Forinstance, the filter parameters for scan line number one may only beadjusted every third time scan line number one is decoded. For thisembodiment, the decoder keeps track of the number of times scan linenumber one has been decoded, and only adjusts the filter parameters onthe third time.

Once the set of operational parameters have been adjusted at step 850,they are once again stored in a storage medium at step 860. As describedpreviously, for one embodiment the data array of operational parametersare stored such that they may be indexed by the scan line number of thecurrent VBI scan line, or a value derived from the current scan linenumber. For instance, the operational parameters associated with scanline number one of a given VBI comprise the first entries within thedata array of operational parameters. For an alternate embodiment of theinvention, the operational parameters associated with the tenth scanline received comprise the first entries within the data array.

Referring now to FIG. 4, wherein a block diagram illustrating oneembodiment of a software environment suitable for practicing the presentinvention is shown. As shown, software embodiment 100 includes commonVBI scan line decoder 10 (hereinafter simply common decoder), capturedriver 112, cooperating with each other to generate image scan lines 18,and VBI scan lines 14. VBI scan lines 14 are decoded by decoder 10 intoVBI stack 16. Decoded scan lines are in turn interpreted by data streaminterpreter 108. Common decoder 10 and capture driver 12 are disclosedin copending U.S. patent application Ser. No. 08/670,568, entitled,“Method And Apparatus For Common Vertical Blanking Interval Scan LineDecoding,” filed Jun. 26, 1996.

Additionally, image scan lines 18 are processed by device specific videodrivers 106, e.g. VfW drivers that implement Microsoft DirectX™ videosupport, which in turn provides the processed data to a deviceindependent video service 104, e.g. Microsoft Video for Windows. Thedevice independent video service 104 then generates the televisionimages for application 102. With respect to the decoded teletext(including closed captions), data stream interpreter 108 interprets thedecoded teletext for application 102.

FIG. 5 illustrates one embodiment of a hardware system suitable forprogramming with the software elements of FIG. 4. As shown, for theillustrated embodiment, hardware system 200 includes CPU 202 and cachememory 204 coupled to each other as illustrated. Additionally, hardwaresystem 200 includes high performance I/O bus 206 and standard I/O bus209. Host bridge 210 couples CPU 202 to high performance I/O bus 206,whereas I/O bus bridge 212 couples the two buses 206-208 to each other.Coupled to bus 206 are system memory 214 and video memory 216. In turn,display device 218 is coupled to video memory 216. Coupled to bus 208 ismass storage 220 and keyboard and pointing device 222.

These elements 202-222 perform their conventional functions known in theart. In particular, mass storage 220 is used to provide permanentstorage for the programming instructions implementing the abovedescribed functions, whereas system memory 214 is used to providetemporary storage for the programming instructions when executed by CPU202. Mass storage 220 may be provided with the programming instructionsby loading the programming instructions from a distribution storagemedium (not shown), or by downloading the programming distributions froma server (not shown) coupled to hardware system 200 via anetwork/communication interface (not shown). Collectively, theseelements are intended to represent a broad category of hardware systems,including but not limited to general purpose computer systems based onthe Pentium™ processor or Pentium Pro processor, both manufactured byIntel Corporation of Santa Clara, Calif., assignee of the presentinvention.

Thus, a method and apparatus for line-specific decoding of VBI scanlines has been described. While the method and apparatus of the presentinvention has been described in terms of the above illustratedembodiments, those skilled in the art will recognize that the inventionis not limited to the embodiments described. The present invention canbe practiced with modification and alteration within the spirit andscope of the appended claims. The description is thus to be regarded asillustrative instead of restrictive on the present invention.

What is claimed is:
 1. A method of decoding data broadcast within avertical blanking interval (VBI), comprising: determining a set ofoperational parameters for each scan line within the VBI based on uniquesignal characteristics of said each scan line, the unique signalcharacteristics being associated with content, source and transmissionof said each scan line; storing the set of operational parameters in astorage medium using a scan line number associated with said each scanline; receiving a scan line of a subsequent VBI from a capture driver,said scan line having associated with it a scan line number; retrievinga set of operational parameters from said storage medium, said set ofoperational parameters corresponding to said scan line number; decodingsaid scan line using said set of operational parameters to create adecoded scan line; adjusting said set of operational parameters basedupon the results of the decoding of said scan line; and replacing saidset of operational parameters associated with said scan line number insaid storage medium with said adjusted set of operational parameters. 2.The method of claim 1, wherein step (C) includes the step of filteringsaid scan line using an Adaptive Baseband Equalization (ABBE) filteringmethod.
 3. The method of claim 1, wherein step (C) includes the step offiltering said scan line using a Lookup Table (LUT) filtering method. 4.The method of claim 1, wherein adjusting said set of operationalparameters includes: error checking the decoded scan line; and enablinga level of filtering, corresponding only to said scan line, based uponthe results of said error checking.
 5. The method of claim 1, whereinsaid set of operational parameters includes one or more AdaptiveBaseband Equalization (ABBE) filtering coefficients.
 6. The method ofclaim 1, wherein said set of operational parameters includes one or morelookup table (LUT) filtering parameters.
 7. The method of claim 1,wherein step (C) includes recovering a run-in clock associated with saidscan line.
 8. The method of claim 7, wherein said set of operationalparameters includes one or more clock recovery parameters.
 9. The methodof claim 8, wherein said clock recovery parameters include an averagestarting point of a run-in-clock.
 10. The method of claim 8, whereinsaid clock recovery parameters include an average voltage level of arun-in-clock.
 11. The method of claim 1, wherein said set of operationalparameters includes one or more mode parameters that indicate a level offiltering to be applied to said scan line.
 12. The method of claim 1,wherein said set of operational parameters includes one or morediagnostic parameters that indicate errors that occurred while decodingsaid scan line, and adjusting said set of operational parametersincludes adjusting said diagnostic parameters to reflect the occurrenceof said errors.
 13. An apparatus comprising: an execution unit thatexecutes programming instructions; and a storage medium coupled to theexecution unit, having stored therein a plurality of programminginstructions implementing a scan line decoder that decodes each of a setof scan lines broadcast within a vertical blanking interval (VBI)according to scan line-specific operational parameters, wherein each setof said scan line-specific operational parameters is determined based onunique signal characteristics associated with content, source andtransmission of a particular scan line within said set of scan lines, isusing a scan line number associated with said particular scan line, isused in decoding a scan line associated with said scan line number of asubsequent VBI, is adjusted based upon the results of the decoding ofsaid scan line, and is stored as adjusted using said scan line number.14. The apparatus of claim 13, wherein said operational parametersinclude one or more Adaptive Baseband Equalization (ABBE) filtercoefficients for performing anti-ghosting filtering on each of said scanlines.
 15. The apparatus of claim 13, wherein said operationalparameters include one or more lookup table (LUT) filtering parametersfor performing anti-ghosting filtering on each of said scan lines. 16.The apparatus of claim 13, wherein said set of operational parametersincludes one or more clock recovery parameters.
 17. The apparatus ofclaim 16, wherein said clock recovery parameters include an averagestarting point of a run-in-clock.
 18. The apparatus of claim 16, whereinsaid clock recovery parameters include an average voltage level of arun-in-clock.
 19. The apparatus of claim 13, wherein said operationalparameters include one or more filter mode parameters that indicate alevel of filtering to be applied to each of said scan lines.
 20. Theapparatus of claim 14, wherein said operational parameters include oneor more diagnostic parameters that indicate errors incurred whiledecoding each of said scan lines.